package org.example.myframework.frame.demo.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 注册person的事件类，用于记录对当前person对象的操作。
 * 定义之后，需要将其发布出去
 */
@Getter
public class PersonChangeEvent extends ApplicationEvent {

    private Person person;

    // person实体类的操作类型：U、I、D
    private String operatorType;

    public PersonChangeEvent(Person person, String operatorType) {
        super(person);
        this.person = person;
        this.operatorType = operatorType;
    }
}
